package Controller;

import config.DBConnector;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.bind.annotation.RequestMapping;
        import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/task")
@ComponentScan(basePackages={"config"})
public class TaskController {
    @Autowired DBConnector connector;

    @RequestMapping(value = {"/",""})
    public String hellTask(@Value("${curvar}")String cusvar ){

        connector.configure();//最终打印配置的db
        return "hello task !! my current variable is " + cusvar;
    }

}